package com.woniuxy;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HomeController {


    @RequestMapping("/")
//    @ResponseBody
    public String root(Model model){
        model.addAttribute("content","我是一段后端程序的内容");
        model.addAttribute("url","https://www.baidu.com/");

        return "index";
    }

    @RequestMapping("getBookName")
    @ResponseBody
    public String getBookName(){
        return "Java从入门到入坟~";
    }


}
